package com.routz.nettydemo.customprotocol.entity;

import java.util.Arrays;

/**
 *  数据包头
 *      开始字节 0x21
 *      命令类型 0x40
 *      总共包数 0x01
 *      本包编号 0x01
 *      结束标志 0x01
 *      卡号后5位
 */
public class PacketHead {

    private Byte headSign;
    private Byte cmdType;
    private Byte packetSize;
    private Byte packetNum;
    private Byte endSign;

    public PacketHead() {
    }

    public PacketHead(Byte headSign, Byte cmdType, Byte packetSize, Byte packetNum, Byte endSign) {
        this.headSign = headSign;
        this.cmdType = cmdType;
        this.packetSize = packetSize;
        this.packetNum = packetNum;
        this.endSign = endSign;
    }

    public Byte getHeadSign() {
        return headSign;
    }

    public void setHeadSign(Byte headSign) {
        this.headSign = headSign;
    }

    public Byte getCmdType() {
        return cmdType;
    }

    public void setCmdType(Byte cmdType) {
        this.cmdType = cmdType;
    }

    public Byte getPacketSize() {
        return packetSize;
    }

    public void setPacketSize(Byte packetSize) {
        this.packetSize = packetSize;
    }

    public Byte getPacketNum() {
        return packetNum;
    }

    public void setPacketNum(Byte packetNum) {
        this.packetNum = packetNum;
    }

    public Byte getEndSign() {
        return endSign;
    }

    public void setEndSign(Byte endSign) {
        this.endSign = endSign;
    }
}
